The present invention concerns a method and a device for transforming a displacement vector component in the process of encoding or decoding a video.
It applies more particularly to a mode of coding where a block of pixel is predictively encoded based on a predictor block pertaining to the same image. This mode of encoding a block of pixel is generally referred to as INTRA Block Copy mode. It is contemplated to adopt this mode, for example, in lossless configuration of the Range Extension of the High Efficiency Video Coding (HEVC: ISO/IEC 23008-2 MPEG-H Part 2/ITU-T H.265) international standard.
When encoding an image in a video sequence, the image is first divided into large blocks referred to as Coding Tree Block (CTB). The size of a Coding Tree Block is typically 64 by 64 pixels. Each Coding Tree Block may then be decomposed in a hierarchical tree of smaller blocks which size may vary and which are the actual blocks to encode. These smaller blocks to encode are referred to as Coding Unit (CU).
The encoding of a particular Coding Unit is typically predictive. This means that a predictor block is first determined. Next, the difference between the predictor block and the Coding Unit is calculated. This difference is called the residue. Next, this residue is compressed. The actual encoded information of the Coding Unit is made of some information to indicate the way of determining the predictor block and the compressed residue. Best predictor blocks are blocks as similar as possible to the Coding Unit in order to get a small residue that could be efficiently compressed.
Encoding may be lossy, meaning that information is lost in the encoding process. The decoded block of pixel is not exactly the same as the original Coding Unit. Typically the loss of information comes from a quantization applied to the residue before entropy coding. This quantization allows a higher compression rate at the price of the loss of accuracy. Typically, high frequencies, namely the high level of details, are removed in the block.
Encoding may be lossless, meaning that the residue is not quantized. This kind of encoding allows retrieving the exact copy of the original samples of the Coding Unit. The lossless encoding is obtained at the expense of compression rate which is much smaller compared to a lossy compression.
The coding mode is defined based on the method used to determine the predictor block for the predictive encoding method of a Coding Unit.
A first coding mode is referred to as INTRA mode. According to INTRA mode, the predictor block is built based on the value of pixels immediately surrounding the Coding Unit within the current image. It is worth noting that the predictor block is not a block of the current image but a construction. A direction is used to determine which pixels of the border are actually used to build the predictor block and how they are used. The idea behind INTRA mode is that, due to the general coherence of natural images, the pixels immediately surrounding the Coding Unit are likely to be similar to pixels of the current Coding Unit. Therefore, it is possible to get a good prediction of the value of pixels of the Coding Unit using a predictor block based on these surrounding pixels.
A second coding mode is referred to as INTER mode. According to INTER mode, the predictor block is a block of another image. The idea behind the INTER mode is that successive images in a sequence are generally very similar. The main difference comes typically from a motion between these images due to the scrolling of the camera or due to moving objects in the scene. The predictor block is determined by a vector giving its location in a reference image relatively to the location of the Coding Unit within the current image. This vector is referred to as a motion vector. According to this mode, the encoding of such Coding Unit using this mode comprises motion information comprising the motion vector and the compressed residue.
We focus in this document on a third coding mode called INTRA Block Copy mode. According to the INTRA Block Copy mode, the block predictor is an actual block of the current image. A displacement vector is used to locate the predictor block. This displacement gives the location in the current image of the predictor block relatively to the location of the Coding Unit in the same current image. It comes that this displacement vector shares some similarities with the motion vector of the INTER mode. It is sometime called motion vector by analogy. As there could not be a motion within an image, strictly speaking, and for the sake of clarity, in this document motion vector always refer to the INTER mode while displacement vector is used for the INTRA Block Copy mode.
The causal principle is the principle that states that all information to decode a particular Coding Unit must be based on already reconstructed Coding Units. At encoding, the whole information may be considered as available. Namely, to encode a given Coding Unit it would be possible to use any information from the entire current images or from all decoded and available other images in the sequence. At decoding, things are different. The decoding of the current images is typically done by decoding sequentially all Coding Unit. The order of decoding follows typically a raster scan order, namely beginning in the upper left of the image, progressing from left to right and from top to bottom. It comes that when decoding a given Coding Unit, only the part of the current image located up or left to the current Coding Unit has already been decoded. This is the only available information for the decoding of the current Coding Unit. This has to be taken into account at encoding. For example, a predictor block in INTRA Block Copy mode, should pertain to the part of the image that will be available at decoding.
In INTRA Block Copy mode, the displacement vector is typically encoded by using the regular motion vector difference (MVD) coding of the INTER mode. This encoding consists, for a component of the vector, in coding whether this component is zero, and if not, to encode its sign and its magnitude. Both components corresponding to the vertical and horizontal directions are encoded that way.